package com.cn.client.module.login.handler;

import com.cn.common.core.model.ResultCode;
import com.cn.common.module.login.response.LoginResponse;
import org.springframework.stereotype.Component;

/**
 */
@Component
public class UserHandlerImpl implements UserHandler {

    @Override
    public void login(int resultCode, byte[] data) {
        if (resultCode == ResultCode.SUCCESS) {
            //登录成功
            LoginResponse loginResponse = new LoginResponse();
            loginResponse.readFromBytes(data);
            //登录成功
            System.out.println(loginResponse.getStatus() + "登录成功");
        } else {
            System.out.println(resultCode);
        }
    }
}
